<!--表格操作栏-->
<eui-panel [collapsible]="false" [collapsed]="true"
           [panelStyle]=""
           [headerStyle]="{padding: '2px 0px'}"
           [bodyStyle]="{padding:'10px 0px'}"
           [footerStyle]="{padding:'5px 0px', marginBottom:'1px', marginTop:'1px'}">
  <eui-panel-header>
    <div class="f-row text-center">
      <div class="f-full"><h3>{{componentTitle}}</h3></div>
    </div>
  </eui-panel-header>
  <eui-panel-footer>
    <eui-linkbutton iconCls="icon-add" [plain]="true" (click)="onOpenEditDlg('add')">添加</eui-linkbutton>
    <eui-linkbutton iconCls="icon-edit" [plain]="true" (click)="onOpenEditDlg('edit')">编辑</eui-linkbutton>
    <eui-linkbutton iconCls="icon-remove" [plain]="true" (click)="onOpenDeleteDlg()">删除</eui-linkbutton>
    <eui-linkbutton iconCls="icon-reload" [plain]="true" (click)="onReLoad()">刷新</eui-linkbutton>
  </eui-panel-footer>
</eui-panel>

<!--Tree表格-->
<eui-treegrid [data]="data" idField="id" treeField="name" [loading]="loading" [loadMsg]="loadMsg"
              [checkbox]="true" [cascadeCheck]="true" [(selection)]="selectRow">
  <eui-grid-column field="name" title="封面类别名称"></eui-grid-column>
  <eui-grid-column field="createTime" title="创建时间"></eui-grid-column>
</eui-treegrid>

<!--添加、编辑弹框-->
<eui-dialog [closed]="editDlgClosed" [closable]="true" [modal]="true" (close)="onCloseDlg()"
            [panelStyle]="{width:'30%',textAlign:'center'}" [headerStyle]="{padding:'10px 0px'}"
            [bodyStyle]="{padding:'5px 2px'}"
            [footerStyle]="{padding: '10px 0px'}">
  <eui-panel-header><h4>{{editDlgTitle}}</h4></eui-panel-header>
  <div class="container user">
    <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12" style="margin: 0 auto;"><!--自适应设置-->
      <form role="form" novalidate [formGroup]="itemForForm" (ngSubmit)="onSubmitForm(itemForForm)">
        <!--名称-->
        <div class="form-group user-field">
          <i class="fa fa-leaf fa-lg"></i>
          <input type="text" class="form-control" formControlName="name"
                 placeholder="{{placeholder.name.title}}{{placeholder.name.prompt}}">
        </div>
        <!--创建时间-->
        <div class="form-group" *ngIf="editRow.id">
            <eui-datetimespinner format="yyyy-MM-dd HH:mm:ss" style="width:100%;height:38px;" [(ngModel)]="editRow.createTime" [ngModelOptions]="{standalone: true}"></eui-datetimespinner>
        </div>
      </form>
    </div>
  </div>
  <!--提交按钮-->
  <eui-panel-footer>
    <button type="button" class="btn" (click)="onSubmitForm(itemForForm)"
            [disabled]="formBtnDisabled||itemForForm.invalid">保存
    </button>&nbsp;&nbsp;
    <button type="button" class="btn" (click)="onEditCancel()">取消</button>
  </eui-panel-footer>
</eui-dialog>
